package com.example.gw_back_end.domain.document;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.math.BigDecimal;
import java.util.List;

@Data
@Document(value = "gw_shopping_car")
public class CartDocument {
    @Id
    private String userId;
    private List<CartItem> items;

    @Data
    public static class CartItem {

        @Field("game_id")
        private String gameId;

        private String coverImage;
        private String title;
        private BigDecimal price;
        private BigDecimal priceD;

        private Integer quantity;
        private BigDecimal totalPrice;
    }
}
